<? include_once("../../../common/common_setting_unit.php"); //引入通用的设置文件?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <? include_once(ROOT_PATH_ . "/controller/common/module/head.php"); ?>
    <? include_once("../controller/data_add.php"); ?>
    <link href="../asset/css/style.css"      rel="stylesheet" type="text/css"/>
</head>


<body>
<div id="topbar">
    <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?>
</div>



<div id="container" class="<? echo $now_extender ?>">
    <div id="maincontent">


        <div id="sidebar">
            <?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?>
        </div>

        <div id="content">

            <!--标题设定-->
            <?php $page_title='新建日报';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>



           <blockquote class="detail-box">


               <ul class="detail-boxing">
                   <form id="data_form" method="post" class="layui-form"
                         action ="data_add_function.php?<? echo $data['url_parameter'] ?>"
                         enctype="multipart/form-data">

                       <input type="hidden"  name="nid" value="<? echo $data['data_detail']['nid']?>" >

                       <blockquote class="layui-elem-quote layui-text">
                           1：请以任务为导向，勾选今日完成或者工作的任务。备注信息将会加入到任务的聊天记录中。<br/>
                           2：未建立的任务，状态选择完成，将会自动变成待审核状态
                       </blockquote>



                       <!--普通的input文本输入-->
                       <div class="layui-form-item name">
                           <label class="layui-form-label">日期：</label>
                           <div class="layui-input-block">
                               <input type="text" class="layui-input"
                                      name="ai_name" size="20" id="publish_date"
                                      value="<? echo date("Y-m-d"); ?>"
                                      >
                           </div>

                       <hr>

                       <div>





                           <!-- 用$now_extender .list_boxe来控制来到确认板块信息显示-->
                           <div class="list-box " >

                               <div class="left_content">
                                   <table class="layui-table" >
                                       <colgroup>
                                           <col width="60" >
                                           <col >
                                           <col width="80" >
                                           <col width="80" >
                                           <col >
                                       </colgroup>
                                       <thead>
                                       <tr>
                                           <th>选择</th>
                                           <th>已建立的任务</th>
                                           <th>状态</th>
                                           <th>项目</th>
                                           <th>备注</th>
                                       </tr>
                                       </thead>
                                       <tbody>


           <?php for ($i = 0; $i < count($task_list); $i++) {?>

               <tr id="item<? echo $task_list['nid'] ?>">
                   <td>
                       <input type="checkbox" lay-skin="primary" name="task_nid[]" value="<? echo $task_list[$i]['nid'] ?>" />
                   </td>
                   <td>
                       <?echo $task_list[$i]['title'] ?>
                       <input name="task_name[<? echo $task_list[$i]['nid'] ?>]" value="<? echo $task_list[$i]['title'] ?>" type="hidden" />
                   </td>
                   <td><? echo $task_list[$i]['status'] ?>
                       <input name="status[<? echo $task_list[$i]['nid'] ?>]" value="<? echo $task_list[$i]['status'] ?>" type="hidden" />
                   </td>
                   <td><? echo $case_name_list[$task_list[$i]['case_id']] ?>
                       <input name="case[<? echo $task_list[$i]['nid'] ?>]" value="<? echo $case_name_list[$task_list[$i]['case_id']] ?>" type="hidden" />
                   </td>
                   <td>
                       <input class="layui-input" name="remark[<? echo $task_list[$i]['nid'] ?>]">
                   </td>


               </tr>
               <?php;} ?>

                                       </tbody>
                                   </table>
                               </div>




                               <div class="right_content">


                               <table class="layui-table">
                                   <colgroup>
                                       <col width="200" >
                                       <col width="110" >
                                       <col width="120" >
                                       <col width="140" >
                                   </colgroup>
                                   <thead>
                                   <tr>
                                       <th>未建立的任务</th>
                                       <th>状态</th>
                                       <th>项目</th>
                                       <th>备注</th>
                                   </tr>
                                   </thead>
                                   <tbody>



                                   <?for($i=0;$i<10;$i++){?>
                                       <tr >
                                           <td><input class="layui-input" name="ai_new_task[]" ></td>
                                           <td>
                                               <select name="ai_new_status[]">
                                                   <option value="进行中">进行中</option>
                                                   <option value="已完成">已完成</option>
                                               </select>
                                           </td>
                                           <td>
                                                   <select name="ai_new_case[]">
                                                       <option value="">请选择</option>
                                                       <?
                                                       foreach ($case_list_normal as $k => $v){?>
                                                       <option value="<?echo $v['nid']?>">【<?echo $unit_client_list[$v['unit']]?>】<?echo $v['name']?></option>
                                                       <?;}?>
                                                   </select>
                                           </td>
                                           <td><input class="layui-input" name="ai_new_remark[]"></td>
                                       </tr>
                                       <?;}?>




                                   </tbody>
                               </table>

                               </div>


                           </div>







                       <div class="function">

                           <button class="layui-btn"  lay-submit type="submit" >立即提交</button>
                           <input type="reset" class="layui-btn" value="重置"/>

                       </div>



                   </form>
               </ul>
           </div>
        </div>



        <?
        //==============================================================================
        //这里上面才是平常开发需要注重的部分，下面的基本不用理会，只有底部JS部分需要根据实际情况去加载
        //==============================================================================
        ?>



            </div>
            <!--detail-box end-->


        </div>
        <!--content端點01-->



</div>
<!--maincontent-->
<br class="clearfloat"/>
</div>
<!--container-->
</div>





<!--渲染日期需要用到的-->
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#publish_date' //指定元素
            ,type: 'datetime'
        });
    });
</script>




<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>

</body>
</html>